package com.sjyp.cms.controller.fornt;

import com.jfinal.core.Controller;
import com.sjyp.cms.model.Picture;

import java.util.List;

/**
 * 日化
 */
public class DailyChemicalsController extends Controller {
    public void index() {
        String servicesSql = "SELECT t_picture.id,t_picture.`name`,t_picture.summary,t_picture.filePath,t_picture.createDate,t_picture.columnId,t_picture.orderNo " +
                "FROM t_picture " +
                "where columnId=? ORDER BY orderNo limit 12";
        int currentColumnId = this.getParaToInt("columnId",4);
        List<Picture> dailyPictures = Picture.dao.find(servicesSql,currentColumnId);
        this.setAttr("dailyPictures",dailyPictures).setAttr("currentColumnId",currentColumnId);
        this.render("dailyChemicals.html");
    }
}
